package com.contact.util.util.filters;

import org.joda.time.LocalDate;

public class DateRangeDataFilter extends AbstractDataFilter<DateRange, DateRange> {

    private static final long serialVersionUID = -4826930323409107250L;
    
    public DateRangeDataFilter(String key, LocalDate fromDate, LocalDate toDate) {
        this(key, new DateRange(fromDate, toDate));
    }
    
    public DateRangeDataFilter(String key, DateRange dateRange) {
        super(DataFilterType.DATE_RANGE, key);      
        super.setFilterValue(dateRange);
    }
    
    @Override 
    public DateRange getDisplayValue() {
        return getFilterValue();
    }
    
    @Override
    public void setDisplayValue(DateRange displayValue) {
        setFilterValue(displayValue);
    }

}
